{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}\\file\UsersW$\wrr15\Home\My Documents\My Files\XINDONG XUE\META-ANALYSIS\REVISION FOR JHE\DATA AND CODE\Part5 Results(20191130).smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 1 Dec 2019, 19:41:54
{txt}
{com}. use "sc_data(20191130).dta"
{txt}
{com}. replace numberofscvariables=2 if id==524 
{txt}(10 real changes made)

{com}. 
. // THIS SECTION PRODUCES THE RESULTS FOR TABLE 11
. 
. ******************************************************************************
. *DEFINITION OF BASIC VARIABLES
. ******************************************************************************
. gen tstat = real(tstatistics)
{txt}(1 missing value generated)

{com}. gen negative = 1
{txt}
{com}. replace negative = -1 if ((badhealth == 1 & badsc == 0) | (badhealth == 0 & badsc == 1))
{txt}(5,727 real changes made)

{com}. replace tstat = tstat*negative
{txt}(5,656 real changes made)

{com}. gen df = nobs
{txt}
{com}. gen obsno = _n
{txt}
{com}. replace df = . if tstat == .
{txt}(1 real change made, 1 to missing)

{com}. gen r = tstat/sqrt(tstat^2+df)
{txt}(1 missing value generated)

{com}. gen varR = (1-r^2)/df
{txt}(1 missing value generated)

{com}. gen seR = sqrt(varR)
{txt}(1 missing value generated)

{com}. gen pcc = r
{txt}(1 missing value generated)

{com}. 
. quietly summ pcc, detail
{txt}
{com}. keep if pcc > r(p1) & pcc < r(p99) 
{txt}(263 observations deleted)

{com}. 
. **************************************************
. *****FINER CATEGORIZATIONS OF SOCIAL CAPITAL******
. **************************************************
. foreach x in "social trust" "perceived social support" "perceived social cohension" "perceived reciprocity" "sense of belonging" "loneliness" "social participation" "social networks" "social support" "social engagement" "volunteering" "group membership" "social integration" "social relationship" {c -(}
{txt}  2{com}. scalar VARNAME = "`x'"
{txt}  3{com}. scalar list VARNAME
{txt}  4{com}. summ pcc if scname_new == "`x'"
{txt}  5{com}. preserve
{txt}  6{com}. gen tstatnew = 0 if scname_new == "`x'"
{txt}  7{com}. replace tstatnew = 1 if tstat<-2 & scname_new == "`x'"
{txt}  8{com}. replace tstatnew = 2 if (tstat>=-2 & tstat<=2) & scname_new == "`x'"
{txt}  9{com}. replace tstatnew = 3 if (tstat>2) & scname_new == "`x'"
{txt} 10{com}. tab tstatnew
{txt} 11{com}. restore
{txt} 12{com}. {c )-}
{txt}   VARNAME = {res}social trust

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}      1,553     .044701    .0562685  -.1486224   .3560345
{txt}(11,225 missing values generated)
(46 real changes made)
(636 real changes made)
(871 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         46        2.96        2.96
{txt}          2 {c |}{res}        636       40.95       43.92
{txt}          3 {c |}{res}        871       56.08      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,553      100.00
{txt}   VARNAME = {res}perceived social support

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        863    .0375708     .070364  -.1553387    .352207
{txt}(11,915 missing values generated)
(43 real changes made)
(536 real changes made)
(284 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         43        4.98        4.98
{txt}          2 {c |}{res}        536       62.11       67.09
{txt}          3 {c |}{res}        284       32.91      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        863      100.00
{txt}   VARNAME = {res}perceived social cohension

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        237    .0431602    .0772561   -.106469   .3534288
{txt}(12,541 missing values generated)
(9 real changes made)
(145 real changes made)
(83 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}          9        3.80        3.80
{txt}          2 {c |}{res}        145       61.18       64.98
{txt}          3 {c |}{res}         83       35.02      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        237      100.00
{txt}   VARNAME = {res}perceived reciprocity

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        179    .0530224    .0546833  -.0304998   .3367952
{txt}(12,599 missing values generated)
(1 real change made)
(109 real changes made)
(69 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}          1        0.56        0.56
{txt}          2 {c |}{res}        109       60.89       61.45
{txt}          3 {c |}{res}         69       38.55      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        179      100.00
{txt}   VARNAME = {res}sense of belonging

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        173    .0384613    .0673535  -.1544428   .3272094
{txt}(12,605 missing values generated)
(8 real changes made)
(93 real changes made)
(72 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}          8        4.62        4.62
{txt}          2 {c |}{res}         93       53.76       58.38
{txt}          3 {c |}{res}         72       41.62      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        173      100.00
{txt}   VARNAME = {res}loneliness

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        114   -.0100915     .062385  -.1520232   .1347921
{txt}(12,664 missing values generated)
(33 real changes made)
(55 real changes made)
(26 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         33       28.95       28.95
{txt}          2 {c |}{res}         55       48.25       77.19
{txt}          3 {c |}{res}         26       22.81      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        114      100.00
{txt}   VARNAME = {res}social participation

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}      1,965    .0338193    .0588375    -.15583   .3598491
{txt}(10,813 missing values generated)
(105 real changes made)
(1,009 real changes made)
(851 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}        105        5.34        5.34
{txt}          2 {c |}{res}      1,009       51.35       56.69
{txt}          3 {c |}{res}        851       43.31      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,965      100.00
{txt}   VARNAME = {res}social networks

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}      1,931    .0154837    .0552336  -.1434608   .3586976
{txt}(10,847 missing values generated)
(187 real changes made)
(1,329 real changes made)
(415 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}        187        9.68        9.68
{txt}          2 {c |}{res}      1,329       68.82       78.51
{txt}          3 {c |}{res}        415       21.49      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      1,931      100.00
{txt}   VARNAME = {res}social support

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        785    .0198478     .054185  -.1565255    .317975
{txt}(11,993 missing values generated)
(64 real changes made)
(548 real changes made)
(173 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         64        8.15        8.15
{txt}          2 {c |}{res}        548       69.81       77.96
{txt}          3 {c |}{res}        173       22.04      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        785      100.00
{txt}   VARNAME = {res}social engagement

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        769    .0187767    .0526321   -.152115   .2500919
{txt}(12,009 missing values generated)
(44 real changes made)
(442 real changes made)
(283 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         44        5.72        5.72
{txt}          2 {c |}{res}        442       57.48       63.20
{txt}          3 {c |}{res}        283       36.80      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        769      100.00
{txt}   VARNAME = {res}volunteering

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        567    .0243998    .0410035  -.1225317   .2965655
{txt}(12,211 missing values generated)
(25 real changes made)
(294 real changes made)
(248 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         25        4.41        4.41
{txt}          2 {c |}{res}        294       51.85       56.26
{txt}          3 {c |}{res}        248       43.74      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        567      100.00
{txt}   VARNAME = {res}group membership

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        537    .0218041    .0552183   -.121924   .3548123
{txt}(12,241 missing values generated)
(52 real changes made)
(330 real changes made)
(155 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         52        9.68        9.68
{txt}          2 {c |}{res}        330       61.45       71.14
{txt}          3 {c |}{res}        155       28.86      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        537      100.00
{txt}   VARNAME = {res}social integration

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        456    .0074891    .0580367  -.1529903   .2758935
{txt}(12,322 missing values generated)
(71 real changes made)
(264 real changes made)
(121 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         71       15.57       15.57
{txt}          2 {c |}{res}        264       57.89       73.46
{txt}          3 {c |}{res}        121       26.54      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        456      100.00
{txt}   VARNAME = {res}social relationship

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        411    .0196639    .0559292  -.1429524    .320807
{txt}(12,367 missing values generated)
(70 real changes made)
(202 real changes made)
(139 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         70       17.03       17.03
{txt}          2 {c |}{res}        202       49.15       66.18
{txt}          3 {c |}{res}        139       33.82      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        411      100.00
{txt}
{com}. 
. ************************************
. ************************************
. ************************************
. ************ TABLE 11 **************
. ************************************
. ************************************
. ************************************
. 
. ******************************************
. *****FINER CATEGORIZATIONS OF HEALTH******
. ******************************************
. 
. gen disease_illness = 0
{txt}
{com}. replace disease_illness = 1 if healthvariables == "hypertension"
{txt}(117 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "diabetes"
{txt}(64 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Number of Chronic Health"
{txt}(40 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "All circulatory system disease"
{txt}(38 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Non-cancer and non-circulatory system.."
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "presence of LLI"
{txt}(25 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "All cancer"
{txt}(30 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Cerebrovascular disease"
{txt}(30 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cardiovascular"
{txt}(30 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Cancer"
{txt}(29 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Ischaemic heart disease"
{txt}(25 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "stroke"
{txt}(24 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Cardiovascular disease"
{txt}(19 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Musculoskeletal disorders"
{txt}(18 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cancer"
{txt}(18 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "long-term sickness absences"
{txt}(18 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Hypertension"
{txt}(16 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "IHD"
{txt}(15 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "ADL disabled"
{txt}(14 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "IADL disabled"
{txt}(14 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "chronic diseases"
{txt}(14 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Crp"
{txt}(12 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Fatal coronary heart disease"
{txt}(4 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Fibrinogen"
{txt}(12 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Serum Albumin"
{txt}(12 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Total cancer"
{txt}(6 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "CHD"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cardiovasular disease"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cirrhosis"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "emphysema or copd"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "heart attack"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "heart failure"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "ischemic heart disease"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "number of disease"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "thyroid problems"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "ulcers"
{txt}(8 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cachexia"
{txt}(7 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cardiac"
{txt}(7 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Cardiovascular disease (stroke and co.."
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Chronic lower respiratory diseases"
{txt}(6 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Coronary heart disease"
{txt}(6 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Non fatal myocardial infarction"
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Non fatal stroke"
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Non-sudden cardiac death"
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Nonfatal myocardial infarction"
{txt}(6 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Stroke"
{txt}(6 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Total coronary heart disease"
{txt}(6 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Total stroke"
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Toul coronary heart disease"
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "year-long illness scores"
{txt}(6 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "C-reactive protein"
{txt}(5 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Heart disease"
{txt}(2 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Malignant neoplasms"
{txt}(5 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Serum fibrinogen"
{txt}(5 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cerebrovascular disease"
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "respiratort diseases"
{txt}(2 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cancer-breast"
{txt}(4 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "cancer-lung"
{txt}(4 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "heart disease-adjusted for poverty"
{txt}(3 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "heart disease-unadjusted"
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "illness and injury"
{txt}(4 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "malignant neoplasms-adjusted for pove.."
{txt}(0 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "malignant neoplasms-unadjusted"
{txt}(1 real change made)

{com}. replace disease_illness = 1 if healthvariables == "number of chronic disease"
{txt}(4 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "long-term limiting illness"
{txt}(3 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "recurrence of acute coronary sydrome"
{txt}(3 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "chronic illness all"
{txt}(2 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "chronic illness hypertension"
{txt}(2 real changes made)

{com}. replace disease_illness = 1 if healthvariables == "Type 2 diabetes"
{txt}(1 real change made)

{com}. replace disease_illness = 1 if healthvariables == "Type 3 diabetes"
{txt}(1 real change made)

{com}. replace disease_illness = 1 if healthvariables == "Type 4 diabetes"
{txt}(1 real change made)

{com}. replace disease_illness = 1 if healthvariables == "Type 5 diabetes"
{txt}(1 real change made)

{com}. replace disease_illness = 1 if healthvariables == "Type 6 diabetes"
{txt}(1 real change made)

{com}. replace disease_illness = 1 if healthvariables == "Type 7 diabetes"
{txt}(1 real change made)

{com}. replace disease_illness = 1 if healthvariables == "diabetes duration"
{txt}(1 real change made)

{com}. sum disease_illness

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
disease_il~s {c |}{res}     12,778    .0649554    .2464568          0          1
{txt}
{com}. 
. 
. replace mortality = 0
{txt}(12,778 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality"
{txt}(609 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality"
{txt}(427 real changes made)

{com}. replace mortality = 1 if healthvariables == "Mortality"
{txt}(265 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality risk"
{txt}(176 real changes made)

{com}. replace mortality = 1 if healthvariables == "risk of dying"
{txt}(121 real changes made)

{com}. replace mortality = 1 if healthvariables == "suicide mortality"
{txt}(91 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-caused mortality"
{txt}(84 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality-male"
{txt}(48 real changes made)

{com}. replace mortality = 1 if healthvariables == "All-causes mortality"
{txt}(44 real changes made)

{com}. replace mortality = 1 if healthvariables == "Mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Death"
{txt}(38 real changes made)

{com}. replace mortality = 1 if healthvariables == "cardiovascular disease mortality"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "All-cause Mortality"
{txt}(36 real changes made)

{com}. replace mortality = 1 if healthvariables == "cardiovascular mortality"
{txt}(5 real changes made)

{com}. replace mortality = 1 if healthvariables == "probility of dying"
{txt}(24 real changes made)

{com}. replace mortality = 1 if healthvariables == "the risk of mortality"
{txt}(24 real changes made)

{com}. replace mortality = 1 if healthvariables == "Total mortality"
{txt}(15 real changes made)

{com}. replace mortality = 1 if healthvariables == "time to death:older cohort"
{txt}(21 real changes made)

{com}. replace mortality = 1 if healthvariables == "All-cause mortality"
{txt}(16 real changes made)

{com}. replace mortality = 1 if healthvariables == "Cancer-cause mortality"
{txt}(18 real changes made)

{com}. replace mortality = 1 if healthvariables == "Heart disease-cause mortality"
{txt}(18 real changes made)

{com}. replace mortality = 1 if healthvariables == "death"
{txt}(18 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality-men"
{txt}(17 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "total mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "mortality-women"
{txt}(15 real changes made)

{com}. replace mortality = 1 if healthvariables == "Trends in mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Cancer mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Chronic lower respiratory diseases mo.. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Coronary heart disease mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Psychiatric disorders mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Stroke mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Suicide mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Type 2 diabetes mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all cause mortality"
{txt}(12 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause death rates"
{txt}(12 real changes made)

{com}. replace mortality = 1 if healthvariables == "morality"
{txt}(12 real changes made)

{com}. replace mortality = 1 if healthvariables == "Sudden cardiac death"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "heart disease death rates"
{txt}(12 real changes made)

{com}. replace mortality = 1 if healthvariables == "other cause death rates"
{txt}(11 real changes made)

{com}. replace mortality = 1 if healthvariables == "completed suicides"
{txt}(11 real changes made)

{com}. replace mortality = 1 if healthvariables == "CVD�mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Other mortality"
{txt}(8 real changes made)

{com}. replace mortality = 1 if healthvariables == "cause specific mortality"
{txt}(9 real changes made)

{com}. replace mortality = 1 if healthvariables == "time to death:younger cohort"
{txt}(9 real changes made)

{com}. replace mortality = 1 if healthvariables == "All cancer mortality"
{txt}(8 real changes made)

{com}. replace mortality = 1 if healthvariables == "cancer-cause mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "cardiovascular  mortality"
{txt}(8 real changes made)

{com}. replace mortality = 1 if healthvariables == "cardiovascular disease-cause mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "infant death"
{txt}(8 real changes made)

{com}. replace mortality = 1 if healthvariables == "suicide-cause mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "unintentional injury-cause mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "CVD Mortality"
{txt}(7 real changes made)

{com}. replace mortality = 1 if healthvariables == "Total Mortality"
{txt}(7 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-Europe-ANZ"
{txt}(7 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-Japan"
{txt}(7 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-North American"
{txt}(7 real changes made)

{com}. replace mortality = 1 if healthvariables == "cancer mortality"
{txt}(5 real changes made)

{com}. replace mortality = 1 if healthvariables == "15-year mortality-men"
{txt}(6 real changes made)

{com}. replace mortality = 1 if healthvariables == "15-year mortality-women"
{txt}(6 real changes made)

{com}. replace mortality = 1 if healthvariables == "age-adjusted cardiovascualr mortality.. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality ADL Impaired"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality ADL Unimpaired"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "male mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "survival"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "All causes mortality"
{txt}(5 real changes made)

{com}. replace mortality = 1 if healthvariables == "female life expectancy"
{txt}(9 real changes made)

{com}. replace mortality = 1 if healthvariables == "female mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "female mortality(FCIRC94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "female mortality(FEXT94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "female mortality(FLIFEX94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "female mortality(FNEO94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "male mortality(MCIRC94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "male mortality(MEXT94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "male mortality(MLIFEX94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "male mortality(MNEO94) "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality rates-females"
{txt}(5 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality rates-males"
{txt}(5 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality rates-total"
{txt}(5 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-high urbanization.. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-low urbanization .. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-married"
{txt}(3 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-medium urbanizati.. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-men"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-non married"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-non-western ethic.. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-western ethic ori.. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "all-cause mortality-women"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "cardiovascular disease mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "external causes-suicide"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "infant mortality-adjusted for poverty"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "infant mortality-unadjusted"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "other-cause mortality"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "pulmonary disease mortality"
{txt}(4 real changes made)

{com}. replace mortality = 1 if healthvariables == "total mortality-adjusted for poverty"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "total mortality-unadjusted"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Mortality per 100,000"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "accident mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "heart mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "infant mortality"
{txt}(6 real changes made)

{com}. replace mortality = 1 if healthvariables == "total mortality"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "violence-related morality rate"
{txt}(3 real changes made)

{com}. replace mortality = 1 if healthvariables == "cancer-mortality"
{txt}(2 real changes made)

{com}. replace mortality = 1 if healthvariables == "cardiovascular-mortality"
{txt}(2 real changes made)

{com}. replace mortality = 1 if healthvariables == "other disease-mortality"
{txt}(2 real changes made)

{com}. replace mortality = 1 if healthvariables == "other external-mortality"
{txt}(2 real changes made)

{com}. replace mortality = 1 if healthvariables == "percentage of total morality that is .. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "self-inflicted injury mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "suicide-mortallity"
{txt}(2 real changes made)

{com}. replace mortality = 1 if healthvariables == "Fatal stroket"
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "Risk of 10-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 11-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 12-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 13-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 14-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 15-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 16-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 17-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 18-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 19-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 20-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 21-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 22-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 23-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 24-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 25-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 26-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 27-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 28-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 29-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 30-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 31-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 32-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 33-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 34-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 35-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 36-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 37-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 38-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 39-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 40-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 41-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 42-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 43-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 44-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 45-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 46-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 47-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 48-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 49-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 50-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 51-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 52-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 53-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 54-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 55-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 56-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 57-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 58-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 8-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "Risk of 9-Year Mortality"
{txt}(1 real change made)

{com}. replace mortality = 1 if healthvariables == "percentage of total morality that is .. "
{txt}(0 real changes made)

{com}. replace mortality = 1 if healthvariables == "mortality rate"
{txt}(0 real changes made)

{com}. sum mortality

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 3}mortality {c |}{res}     12,778    .1910315    .3931292          0          1
{txt}
{com}. 
. gen depression = 0
{txt}
{com}. replace depression = 1 if healthvariables == "depression"
{txt}(257 real changes made)

{com}. replace depression = 1 if healthvariables == "Depression"
{txt}(143 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive mood"
{txt}(96 real changes made)

{com}. replace depression = 1 if healthvariables == "major depression"
{txt}(55 real changes made)

{com}. replace depression = 1 if healthvariables == "depression symptoms"
{txt}(36 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive"
{txt}(35 real changes made)

{com}. replace depression = 1 if healthvariables == "Depressive Symptoms"
{txt}(26 real changes made)

{com}. replace depression = 1 if healthvariables == "T3 depression"
{txt}(0 real changes made)

{com}. replace depression = 1 if healthvariables == "Depression symptoms"
{txt}(20 real changes made)

{com}. replace depression = 1 if healthvariables == "Antidepressant treatment"
{txt}(18 real changes made)

{com}. replace depression = 1 if healthvariables == "antidepressant treatment"
{txt}(18 real changes made)

{com}. replace depression = 1 if healthvariables == "anxiety/depression"
{txt}(18 real changes made)

{com}. replace depression = 1 if healthvariables == "Geriatric Depression scale"
{txt}(15 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive symptoms"
{txt}(13 real changes made)

{com}. replace depression = 1 if healthvariables == "self-rating depression scale"
{txt}(5 real changes made)

{com}. replace depression = 1 if healthvariables == "Depressed Mood"
{txt}(8 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive symptom"
{txt}(7 real changes made)

{com}. replace depression = 1 if healthvariables == "level of depression"
{txt}(7 real changes made)

{com}. replace depression = 1 if healthvariables == "depressed"
{txt}(5 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive symptomes"
{txt}(5 real changes made)

{com}. replace depression = 1 if healthvariables == "Depressive symptom"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive symptoms:Sweden men"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive symptoms:Sweden women"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive symptoms:Ukraine men"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "depressive symptoms:Ukraine women"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "dizygotic major depression"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "dizygotic number of depressive symptoms"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "monozygotic major depression"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "monozygotic number of depressive symp.. "
{txt}(0 real changes made)

{com}. replace depression = 1 if healthvariables == "mumber of depressive symptoms"
{txt}(4 real changes made)

{com}. replace depression = 1 if healthvariables == "Depressive Mood"
{txt}(2 real changes made)

{com}. replace depression = 1 if healthvariables == "anxiety/depression(females) "
{txt}(0 real changes made)

{com}. replace depression = 1 if healthvariables == "anxiety/depression(males) "
{txt}(0 real changes made)

{com}. replace depression = 1 if healthvariables == "mental status(CMD5,anxiety,depression) "
{txt}(0 real changes made)

{com}. replace depression = 1 if healthvariables == "mental status(only by depression) "
{txt}(0 real changes made)

{com}. replace depression = 1 if healthvariables == "often felt depressed"
{txt}(1 real change made)

{com}. sum depression

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 2}depression {c |}{res}     12,778    .0646424    .2459033          0          1
{txt}
{com}. 
. foreach x in mortality disease_illness depression {c -(}
{txt}  2{com}. scalar VARNAME = "`x'"
{txt}  3{com}. scalar list VARNAME
{txt}  4{com}. summ pcc if `x' == 1
{txt}  5{com}. preserve
{txt}  6{com}. gen tstatnew = 0 if `x' == 1
{txt}  7{com}. replace tstatnew = 1 if tstat<-2 & `x' == 1
{txt}  8{com}. replace tstatnew = 2 if (tstat>=-2 & tstat<=2) & `x' == 1
{txt}  9{com}. replace tstatnew = 3 if (tstat>2) & `x' == 1
{txt} 10{com}. tab tstatnew
{txt} 11{com}. restore
{txt} 12{com}. {c )-}
{txt}   VARNAME = {res}mortality

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}      2,441    .0197678    .0600254  -.1534341   .3473571
{txt}(10,337 missing values generated)
(231 real changes made)
(1,521 real changes made)
(689 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}        231        9.46        9.46
{txt}          2 {c |}{res}      1,521       62.31       71.77
{txt}          3 {c |}{res}        689       28.23      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      2,441      100.00
{txt}   VARNAME = {res}disease_illness

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        830    .0140129    .0472591  -.1378796   .3584205
{txt}(11,948 missing values generated)
(46 real changes made)
(630 real changes made)
(154 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         46        5.54        5.54
{txt}          2 {c |}{res}        630       75.90       81.45
{txt}          3 {c |}{res}        154       18.55      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        830      100.00
{txt}   VARNAME = {res}depression

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        826    .0276054    .0652143  -.1499604   .3467972
{txt}(11,952 missing values generated)
(71 real changes made)
(494 real changes made)
(261 real changes made)

   tstatnew {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}         71        8.60        8.60
{txt}          2 {c |}{res}        494       59.81       68.40
{txt}          3 {c |}{res}        261       31.60      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        826      100.00
{txt}
{com}. 
. summ pcc if physicalhealth==1 & selfreported==1

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}        995    .0265535    .0636745  -.1545959   .3560345
{txt}
{com}. summ pcc if mentalhealth==1 & selfreported==1

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 9}pcc {c |}{res}      2,668    .0254998    .0630899  -.1565255   .3467972
{txt}
{com}. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}\\file\UsersW$\wrr15\Home\My Documents\My Files\XINDONG XUE\META-ANALYSIS\REVISION FOR JHE\DATA AND CODE\Part5 Results(20191130).smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 1 Dec 2019, 19:41:54
{txt}{.-}
{smcl}
{txt}{sf}{ul off}